package com.dcy.znoa.service.publiz;

import com.dcy.znoa.common.exception.BusinessException;
import com.dcy.znoa.common.util.pojo.JsonCommon;
import com.dcy.znoa.common.util.pojo.JsonForList;
import com.dcy.znoa.controller.publiz.model.department.SelectDepartmentModel;
import com.dcy.znoa.domain.publiz.Department;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

public interface DepartmentService {
    //查询部门时，必须加 comp_id
    public JsonForList selectList(SelectDepartmentModel model) throws InvocationTargetException, IllegalAccessException;

    //查询部门时，必须加 comp_id
    public JsonForList selectByCompId(int compId) throws InvocationTargetException, IllegalAccessException, InstantiationException;

    public JsonCommon insert(Department var1) throws BusinessException;

    public JsonCommon updateById(Department var1) throws BusinessException;//修改和逻辑删除都用这个方法实现

    public void updateRedis(Long compId) ;
    // 物理删除
    public Integer deleteById(Long depId);
    //TODO 查询和自己平级或比自己级别高的部门，用于修改部门的上级部门时
    public List selectUpperByCompId();
}
